package com.friends.digitpic.service.service.impl;

import javax.annotation.Resource;

import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Component;
import com.friends.digitpic.service.dao.UserpicDao;
import com.friends.digitpic.service.entity.UserpicEntity;
import com.friends.digitpic.service.service.UserpicService;

/**
 * 描述：用户图片
 * @author: jiangge xia
 * @since：2018年09月15日 22时44分22秒 星期六 
 * @version:1.0
 */

@Transactional
@Component
public class UserpicServiceImpl implements UserpicService {

	@Resource(name = "userpicDao")
	private UserpicDao userpicDao;


	public UserpicEntity getUserpic(String userpicid) {
		return userpicDao.get(userpicid);
	}

	public int updateUserpic(UserpicEntity userpic) {
		return userpicDao.update(userpic);
	}

	public void insertUserpic(UserpicEntity userpic) {
		userpicDao.insert(userpic);
		
	}

	public MiniDaoPage<UserpicEntity> getUserpicAll(UserpicEntity userpic, int page, int rows) {
		return userpicDao.getAll(userpic, page, rows);
	}

	public void deleteUserpic(UserpicEntity userpic) {
		userpicDao.delete(userpic);
		
	}
}
